This sounds somewhat like the short story " It's Such a Beautiful Day " by Isaac Asimov.
Read online at the Open Library in Nightfall and other stories published 1969.
scifi.stackexchange.com/users/38970/This isn't my real name
Arthur C. Clarke's story The City and the Stars also comes to mind.
Do you have any more details about what may have happened in the story?
Brief synopsis of 'The City and the Stars':Story is set 1 billion years in the future on Earth - specifically in the city of Diaspar - which is fully enclosed.
No one in millions of years has arrived or left from this city.
A boy (Alvin) is born and is a bit unusual in that he feels compelled to try to leave the city.
Eventually he does and finds other humans on the planet.
Alvin continues to try to find out why the inhabitants of Diaspar are so afraid of leaving their city...
There is much much more to the story - i recommend reading it.
One of my favourites!
scifi.stackexchange.com/users/31200/markv
Well, not a boy, but there is "
The Pedestrian" by Ray Bradbury, first published in 1951.
In the year 2053 A.D, Leonard Mead likes to take long walks at night, something which no one else does.
Everyone stays indoors watching TV.
On one of his usual walks he encounters a police car which is possibly robotic.
It is the only police unit in a city of three million, since the purpose of law enforcement has disappeared with everyone watching TV at night.
Mead tells the car that he is a writer when asked about his profession, but the car does not understand, since no one buys books or magazines in the television-dominated society.
The police car or its occupants struggle to understand why Mead would be out walking for no reason and so decides to take him to the Psychiatric Center for Research on Regressive Tendencies.
He is forced to get in the car.
As the car passes through his neighborhood, Leonard Mead in the locked confines of the backseat says, "That's my house".
There is no reply.
scifi.stackexchange.com/users/35225/Trish Ling
I think I remember a story like this...
It might be
The Machine Stops by E. M. Forster: The story describes a world in which most of the human population has lost the ability to live on the surface of the Earth.
Each individual now lives in isolation below ground in a standard 'cell', with all bodily and spiritual needs met by the omnipotent, global Machine.
Travel is permitted but unpopular and rarely necessary.
Communication is made via a kind of instant messaging/video conferencing machine called the speaking apparatus, with which people conduct their only activity, the sharing of ideas and what passes for knowledge.
The two main characters, Vashti and her son Kuno, live on opposite sides of the world.
Vashti is content with her life, which, like most inhabitants of the world, she spends producing and endlessly discussing secondhand 'ideas'.
Kuno, however, is a sensualist and a rebel.
He persuades a reluctant Vashti to endure the journey (and the resultant unwelcome personal interaction) to his cell.
Full story here
scifi.stackexchange.com/users/1180/AndyD273
It's Such A Beautiful Day seems by far the likeliest.
The boy's mother is deeply humiliated when he catches a cold after going outside in the rain
(disease is almost unknown now) and is inclined to accept his schoolteacher's advice to have him treated with a psychic probe.
The boy's psychiatrist is vehemently opposed to this, and it is strongly hinted (though not flatly stated)
that he himself was once "treated" in that way for a similar "disorder".
In the last sentence, the psychiatrist himself decides to walk home because "it's such a beautiful day".
scifi.stackexchange.com/users/92445/Mike Stone
I am trying to locate a sci fi story, probably written in the 50's, most likely by Bradbury or Heinlein, about a dissatisfied boy who breaks the rules in a future society where no one goes outside anymore because technology has eliminated the need to do so. Any ideas?
Dissatisfied boy breaks the rules in a future society, technology has eliminated need to go outside
scifi.stackexchange.com
<story-identification>
scifi.stackexchange.com/questions/83989
scifi.stackexchange.com/users/43087/t coolidge
This sounds like the short story " It's Such a Beautiful Day " by Isaac Asimov. However, "The Machine Stops"  by E. M. Forster is another suggestion. The possibilities are "It’s Such a Beautiful Day" written by Isaac Asimov and "The Machine Stops" written by E.M, the former being the most likely. 
The likeliest answer is "It’s Such a Beautiful Day" written by Isaac Asimov though "The Machine Stops" written by E.M. Forster is also a contender. 