It should be a switch for the ceiling light, but connected in such a way that it doesn't do anything unless the other switch (the one built into the light fixture) is turned on.
Originally Posted by barts
A switch on the bedroom wall usually means the previous owners enjoyed a BDSM lifestyle.
Wrong thread for this answer, I think.
Usually such a lifestyle preference is indicated by the presence of unusually large numbers of Byam hooks in the bedroom.