We have to supply an earth with all lighting supplies since 1966, but we don't have to use them.
If the switch or lamp is marked as Class II with the double square there is no need to connect the earth wire, you can simply put the earth wire into a block connector so it feeds next item or keeps it out of way if no further items.
If not marked as class II then must connect the earth.
If it has an earth terminal it requires an earth. You should use the earth that was there before you changed the light. Regarding your new "switch" although it does NOT require an earth, you should leave the earth wire there, but isolated (so it can not touch anything) but it will be there for any future use.
DIY how to tutorial projects and guides - Did you know we have a DIY Projects section? Well, if no, then we certainly do! Within this area of our site have literally hundreds of how-to guides and tutorials that cover a huge range of home improvement tasks. Each page also comes with pictures and a video to make completing those jobs even easier!