Since "Serialization in Java is a mechanism of writing the state of an object into a byte-stream and Deserialization is vice versa of this". So it got me thinking that is it Serialization that makes Java platform independent?
Serialization/deserialization is about data moving in and out of your running program. At this point, because your program is already running, platform dependence/independence has already happened.
Platform independence happens because of compilation of a Java program to a bytecode format. This bytecode is same for all platforms which is then executed by a platform dependent engine. The platform dependent engine/runtime is installed on your machine when you install the JVM/JRE. So the Java code goes:
Java code -> Bytecode -> platform dependent runtime