I assume you don't have much experience with active kids, do you? In asian countries climbing up onto the table in front of adults is extremely impolite, but kids like doing stunts like that. Not to mention pulling the light on and off so suddenly. These behaviors need to be disciplined immediately. Not everyone is blessed to be born a genius mindreader in order to understand the flow of logic and message from Conan. Conan also has a history of sticking his nose into various places, and his words and actions always seem to be puzzling and spontaneous. Currently to Ran, Conan is a precocious boy who sometimes makes cheeky impolite remarks towards adults and who once got himself into a near-death situation because he sneaked out of the adults watching to rescue a little girl.
But you have to consider the sequence of events here? As I said, Conan just spoonfed clues to them 3 seconds ago - and they know it (i.e. they check in with him several times after every deductions, he was evidently giving them feedbacks and clarifications, etc.). It stands to reason that whatever he'll do next will work towards spoonfeeding them clues as well. There's no reason for Ran to consider Conan's action to be "pranks", not when according to in-universe logic, he was distinctively not doing that.
So it's weird as hell that Ran did so.
Like sure, any other time his actions can be viewed as such, but in this context, especially considering he's been feeding them clues for a couple of pages now (so at least 5-10 minutes), his actions cannot be easily be considered pranks in anyway.