The leaves of my broad beans have rust coloured spots. Will this affect the beans and will it be safe to compost them?
Probably broad bean rust, which is fairly common but not too damaging. This is what the RHS says about it:
In short, the beans will be fine, but don't compost the plants when you have picked them all.