We study the vortex pinning effect on the vortex lattice structure of the
rotating two-component Bose-Einstein condensates (BECs) in the presence of
impurities or disorder by numerically solving the time-dependent coupled
Gross-Pitaevskii equations. We investigate the transition of the vortex lattice
structures by changing conditions such as angular frequency, the strength of
the inter-component interaction and pinning potential, and also the lattice
constant of the periodic pinning potential. We show that even a single impurity
pinning potential can change the unpinned vortex lattice structure from
triangular to square or from triangular to a structure which is the overlap of
triangular and square. In the presence of periodic pinning potential or optical
lattice, we observe the structural transition from the unpinned vortex lattice
to the pinned vortex lattice structure of the optical lattice. In the presence
of random pinning potential or disorder, the vortex lattice melts following a
two-step process by creation of lattice defects, dislocations, and
disclinations, with the increase of rotational frequency, similar to that
observed for single component Bose-Einstein condensates. However, for the
binary BECs, we show that additionally the two-step vortex lattice melting also
occurs with increasing strength of the inter-component interaction