Same material renders differently on a mesh generated from script and normal cubes.

I think I have exactly same settings but for some reason the texture is not rendered correctly in the script generated object on the right side. It looks like some issue with Normal texture mapping. What could be wrong with it? Am I using UV mapping or something wrong.

Try calling RecalculateNormals() on the mesh after generating it; when the normals on a mesh are not set, they will be pointed in an arbitrary direction or perhaps even zero, which will adversely affect lighting.