The reason why frequency is important is that it determines the energy of a single photon, the energy is equal to frequency x Planck's constant.
A simplified explanation:
An atom can absorb a photon and increase it's energy. In the same way it can emitt a photon in order to reduce its energy,this is known as the photoelectric effect (Einstein).
When the energy of an atom increases/decreases the way it interacts with its neighbors changes, which it turn means that photons can affect chemical processes (for example in a plant where the extra energy is used to make glucose).
In the case of the lightbulb the wire is heated up the current and the atoms can absorb some of that energy, when the atom relaxes it emitts a photon= the wire emitts light.
Search for "photoelectric effect" and you should be able to find a better explanation somewhere.