If you want the following theories and explanations in video form, Matpat made a great video about it.
"Rule of cool" applies here. There is no logical consistency. The MCU Ant-Man movie (Ignoring all comic canon here, only Earth-199999 applies) stated that Pym particles work by increasing or decreasing the distances between atoms, so mass stays the same whilst density changes.
For this reason, Ant-Man's strength becomes more focussed when he's small. This is shown a few times when he hits people while small, placing the full weight of his body into a single punch that is itself concentrated into a much smaller area than usual, knocking people for six. It's also shown once in the movie that the increased density means whenever he collides with something at any kind of speed, the full force of his weight also hits that object and can damage it. When he falls from the bathtub, his body impacting the floor cracks one of the tiles. For some reason, this concept was never shown again, despite Ant-Man colliding with all sorts of objects. It's also noted that given his relative small size, Ant-Man punching things should do a lot more damage than it appears to, putting holes through people rather than simply knocking them unconscious.
Another thing is that when Ant-Man
goes sub-atomic and gets stranded, he should have caused a singularity from being so small and resulted in a small black hole that swallowed the Earth. There's also the fact that this scene contradicts the way that Pym particles were stated to work in the same movie, as if they only reduced the distances between atoms, then once you got to atomic size, there's no more distance to reduce, ergo that's the smallest you should be able to go.
Following the same science, objects that grow should lose density, meaning that when
The Ant and the Thomas The Tank Engine toy
get blown up to massive size, they should have simply floated away due to their much lower density making them less dense than air. Same thing should have happened when Lang became Giant-Man. But Marvel decided that the way Pym particles work is they turn him into a superhero, rather than following any consistent science.