This is a very basic question.
The diffeomorphism between open disk and open square exists.
The closed square cannot be diffeomorphic to closed disk as the boundary is not smooth and the diffeomorphism will map boundary to boundary.
So given any diffeomorphism between open disk and open square, I cannot extend it to the boundary, though they are homeo.
Q1: What is the obstruction to the extension? Intuitive reason please.
Q2: Clearly diffeomorphism open sets as above does not see angles on the boundary though there is. However Q1's extension issue does say those diffeomorphisms have some memory on the boundary information as you cannot further extend it. Is there a way to extract this remnant information as the morphism does carry the information about the boundary? Say $A$ is diffeo to $B$ as open sets and I want to check whether $\bar{A}$ diffeo to $\bar{B}$ where the closure is taken in some ambient space?
Q3: Under what kind of condition, do I know there is possible extension?
About Q1, the obstruction is that, given any diffeomorphism between open square and a disk, the derivative will become increasingly singular as you approach the corner.
For Q2/Q3 (I don't really see the difference), it follows from what you explain that differential structure doesn't resolve the problem. If you allow arbitrary ambient spaces, then you can never rule it out (for example, $A$ and $B$ can be made to be closed), and in general, I doubt you can have any negative result without completeness assumption on the ambient spaces. Even then, the closure could vary wildly. For example, one-point compactification of a disk is very different from closure on the plane.
On the positive side, if $A$ and $B$ are isometric and embedded in complete metric spaces, then their closures are also isometric. In general, some kind of angle-preserving condition could also suffice. For example, the open square and the open disk are not holomorphic (as subsets of the complex plane).