Allocating more RAM to Minecraft can do two things:
If the game's performance is being limited by a lack of available RAM, it will ease that possible performance bottleneck.
If the game is crashing due to Java running out of RAM (either due to bugs or due to complex constructions/mods in a world), it will postpone or completely prevent the crash from happening.
Whether allocating more RAM does either (or both) of these depends highly on what the source of the performance problem is in the first place; your particular computer's configuration and components; the size of the texture's you're using (32×32 takes 4× the RAM the default textures do, 64×64 takes 16× the default, etc.); the details of your Minecraft world(s); and what mods (if any) you have installed.
The default amount of RAM set by the Minecraft launcher is 1GB. This is usually plenty, but spikes in RAM usage or unusual circumstances can make it inadequate. If the game is normally running OK on 1GB but it's having a few issues sometimes, doubling it to 2GB should be plenty. If doubling it doesn't help, then the problem may not be solvable simply by giving the game more RAM and you may need to address the problem at the source: removing demanding mods, reducing texture pack size, solving physical heat problems, upgrading system drivers, turning off background processes, making redstone contraptions more efficient, etc.